<script setup>
import { useRouter } from 'vue-router';

const router = useRouter()
function to(path) {
    router.push(path)
}
</script>

<template>
    <div class="main">
        <van-nav-bar title="消息" />
        <div class="content">
            <van-cell-group>
                <van-cell title="通知" is-link @click="to('/messages')">
                    <template #icon>
                        <van-icon name="bell" size="20px" color="green"></van-icon>
                    </template>
                </van-cell>
                <van-cell title="粉丝" is-link @click="to('/fans')">
                    <template #icon>
                        <van-icon name="friends" size="20px" color="pink"></van-icon>
                    </template>
                </van-cell>
                <van-cell title="获赞" is-link @click="to('/liked')">
                    <template #icon>
                        <van-icon name="like" size="20px" color="red"></van-icon>
                    </template>
                </van-cell>
                <van-cell title="评论" is-link @click="to('/comments')">
                    <template #icon>
                        <van-icon name="comment" size="20px" color="blue"></van-icon>
                    </template>
                </van-cell>
            </van-cell-group>
        </div>
    </div>
</template>
<style lang="scss" scoped>
.van-cell-group {
    .van-cell {
        border-radius: 10px;
        margin: 5px 0;
    }
}

.van-icon {
    margin: 0 10px;
}
</style>